package com.jade.platform.admin.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jade.core.web.controller.BaseController;
import com.jade.platform.admin.api.entity.request.UserInfoQueryReq;
import com.jade.platform.admin.api.entity.vo.UserInfoVo;
import com.jade.platform.admin.facade.AdminFacade;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * admin模块
 * @author Arnold
 * @version V2.0
 * @date 2021/12/23 17:11
 **/
@RestController
@RequestMapping("admin")
@AllArgsConstructor
public class AdminController extends BaseController {

    private final AdminFacade adminFacade;

    /**
      * 测活
      * @param
      * @return java.lang.String
      * @author Arnold
      * @date 2022/7/7
      * @throws
      *
     **/
    @GetMapping("/alive")
    public String alive() {
        return adminFacade.alive();
    }

    /**
      * 分页查询
      * @param userInfoQueryReq 查询参数
      * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.jade.platform.admin.api.entity.vo.UserInfoVo>
      * @author Arnold
      * @date 2022/7/7
      * @throws
      *
     **/
    @GetMapping("/page")
    public Page<UserInfoVo> page(UserInfoQueryReq userInfoQueryReq) {
        return adminFacade.page(userInfoQueryReq);
    }


}